# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=apachetomcatscanner
_pkgname=apachetomcatscanner
pkgver=3.2
pkgrel=7
pkgdesc='Apache Tomcat vulnerability scanner.'
arch=('any')
groups=('blackarch' 'blackarch-scanner' 'blackarch-webapp')
url='https://github.com/p0dalirius/ApacheTomcatScanner'
license=('GPL2')
depends=('python' 'python-requests' 'python-xlsxwriter' 'python-sectools')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('7dce0dab0db3df78e37275acc0b2403c5806498a552440c8d9b5f14671b6016d717dc3f85dde0309245abb5902083f4f545377ddc0a4e08d262c69ce5478e28a')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  rm "$pkgdir/usr/bin/ApacheTomcatScanner"
}

